﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;

using System.Text;
using Portal.Environment;
using Portal.Language;
using Portal.Interface;

namespace Portal.CDSP
{
    public class StatisticBLL
    {
        public DataTable TableThongKe()
        {
            DataTable dtb = new DataTable();
            SqlConnection Conn = new SqlConnection(Environments.ConnectionString);
            try
            {

                Conn.Open();
                DataSet ds = new DataSet();
                SqlCommand cmdUpd = new SqlCommand("sp_SiteStatistic", Conn);
                cmdUpd.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter da = new SqlDataAdapter(cmdUpd);

                da.Fill(ds);
                dtb = ds.Tables[0];
            }
            catch { }
            finally
            {
                if (Conn.State == ConnectionState.Open)
                    Conn.Close();
                Conn.Dispose();
            }
            return dtb;
        }
    }
}
